/* eslint-disable no-undef */
const chunk_padding = "____";

function wrapChunk(chunkName) {
  return `${chunk_padding}${chunkName}${chunk_padding}`;
}

function destructChunk(wrappedChunkName) {
  return wrappedChunkName.replace(`${chunk_padding}`, "");
}

function isWrappedChunk(fileName) {
  return fileName.startsWith(chunk_padding) && fileName.endsWith(chunk_padding);
}

module.exports = {
  wrapChunk,
  destructChunk,
  isWrappedChunk,
};
